!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s}); !function(a){var b=function(b,c){this.settings=c,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,aspectRatio:0},this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=c.border>=0?c.border:c.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.spinner={phase:0,timeSlot:150,$el:a('
'),intervalId:null},this.checkWidthIntervalId=null,this.galleryWidth=b.width(),this.$gallery=b};b.prototype.getSuffix=function(a,b){var c,d;for(c=a>b?a:b,d=0;d img");return 0===b.length&&(b=a.find("> a > img")),0===b.length?null:b},b.prototype.captionFromEntry=function(a){var b=a.find("> .caption");return 0===b.length?null:b},b.prototype.displayEntry=function(b,c,d,e,f,g){b.width(e),b.height(g),b.css("top",d),b.css("left",c);var h=this.imgFromEntry(b);if(null!==h){h.css("width",e),h.css("height",f),h.css("margin-left",-e/2),h.css("margin-top",-f/2);var i=h.attr("src"),j=this.newSrc(i,e,f);h.one("error",function(){h.attr("src",h.data("jg.originalSrc"))});var k=function(){i!==j&&h.attr("src",j)};"skipped"===b.data("jg.loaded")?this.onImageEvent(i,a.proxy(function(){this.showImg(b,k),b.data("jg.loaded",!0)},this)):this.showImg(b,k)}else this.showImg(b);this.displayEntryCaption(b)},b.prototype.displayEntryCaption=function(b){var c=this.imgFromEntry(b);if(null!==c&&this.settings.captions){var d=this.captionFromEntry(b);if(null==d){var e=c.attr("alt");"undefined"==typeof e&&(e=b.attr("title")),"undefined"!=typeof e&&(d=a('
'+e+"
"),b.append(d),b.data("jg.createdCaption",!0))}null!==d&&(this.settings.cssAnimation||d.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(b))}else this.removeCaptionEventsHandlers(b)},b.prototype.onEntryMouseEnterForCaption=function(b){var c=this.captionFromEntry(a(b.currentTarget));this.settings.cssAnimation?c.addClass("caption-visible").removeClass("caption-hidden"):c.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},b.prototype.onEntryMouseLeaveForCaption=function(b){var c=this.captionFromEntry(a(b.currentTarget));this.settings.cssAnimation?c.removeClass("caption-visible").removeClass("caption-hidden"):c.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},b.prototype.addCaptionEventsHandlers=function(b){var c=b.data("jg.captionMouseEvents");"undefined"==typeof c&&(c={mouseenter:a.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:a.proxy(this.onEntryMouseLeaveForCaption,this)},b.on("mouseenter",void 0,void 0,c.mouseenter),b.on("mouseleave",void 0,void 0,c.mouseleave),b.data("jg.captionMouseEvents",c))},b.prototype.removeCaptionEventsHandlers=function(a){var b=a.data("jg.captionMouseEvents");"undefined"!=typeof b&&(a.off("mouseenter",void 0,b.mouseenter),a.off("mouseleave",void 0,b.mouseleave),a.removeData("jg.captionMouseEvents"))},b.prototype.prepareBuildingRow=function(a){var b,c,d,e,f,g=!0,h=0,i=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,j=i/this.buildingRow.aspectRatio,k=this.buildingRow.width/i>this.settings.justifyThreshold;if(a&&"hide"===this.settings.lastRow&&!k){for(b=0;bf)&&(h=f);return this.settings.fixedHeight&&h>this.settings.rowHeight&&(h=this.settings.rowHeight),{minHeight:h,justify:g}},b.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},b.prototype.flushRow=function(a){var b,c,d,e=this.settings,f=this.border;if(d=this.prepareBuildingRow(a),c=d.minHeight,a&&"hide"===e.lastRow&&-1===c)return void this.clearBuildingRow();this.maxRowHeight.percentage?this.maxRowHeight.value*e.rowHeight0&&this.maxRowHeight.value0;b--)c=Math.floor(Math.random()*(b+1)),d=a[b],a[b]=a[c],a[c]=d;return this.insertToGallery(a),a},b.prototype.sortArray=function(a){return a.sort(this.settings.sort),this.insertToGallery(a),a},b.prototype.resetFilters=function(b){for(var c=0;c=this.yield.every))return void this.startImgAnalyzer(b);this.buildingRow.entriesBuff.push(d),this.buildingRow.aspectRatio+=f,this.buildingRow.width+=f*this.settings.rowHeight,this.lastAnalyzedIndex=c}else if("error"!==d.data("jg.loaded"))return}this.buildingRow.entriesBuff.length>0&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.$gallery.trigger(b?"jg.resize":"jg.complete")},b.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&clearTimeout(this.imgAnalyzerTimeout)},b.prototype.startImgAnalyzer=function(a){var b=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){b.analyzeImages(a)},.001)},b.prototype.onImageEvent=function(b,c,d){if(c||d){var e=new Image,f=a(e);c&&f.one("load",function(){f.off("load error"),c(e)}),d&&f.one("error",function(){f.off("load error"),d(e)}),e.src=b}},b.prototype.init=function(){var b=!1,c=!1,d=this;a.each(this.entries,function(e,f){var g=a(f),h=d.imgFromEntry(g);if(g.addClass("jg-entry"),g.data("jg.loaded")!==!0&&"skipped"!==g.data("jg.loaded"))if(null!==d.settings.rel&&g.attr("rel",d.settings.rel),null!==d.settings.target&&g.attr("target",d.settings.target),null!==h){var i=d.extractImgSrcFromImage(h);if(h.attr("src",i),d.settings.waitThumbnailsLoad===!1){var j=parseInt(h.attr("width"),10),k=parseInt(h.attr("height"),10);if(!isNaN(j)&&!isNaN(k))return g.data("jg.width",j),g.data("jg.height",k),g.data("jg.loaded","skipped"),c=!0,d.startImgAnalyzer(!1),!0}g.data("jg.loaded",!1),b=!0,d.isSpinnerActive()||d.startLoadingSpinnerAnimation(),d.onImageEvent(i,function(a){g.data("jg.width",a.width),g.data("jg.height",a.height),g.data("jg.loaded",!0),d.startImgAnalyzer(!1)},function(){g.data("jg.loaded","error"),d.startImgAnalyzer(!1)})}else g.data("jg.loaded",!0),g.data("jg.width",g.width()|g.css("width")|1),g.data("jg.height",g.height()|g.css("height")|1)}),b||c||this.startImgAnalyzer(!1),this.checkWidth()},b.prototype.checkOrConvertNumber=function(b,c){if("string"===a.type(b[c])&&(b[c]=parseFloat(b[c])),"number"!==a.type(b[c]))throw c+" must be a number";if(isNaN(b[c]))throw"invalid number for "+c},b.prototype.checkSizeRangesSuffixes=function(){if("object"!==a.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var b=[];for(var c in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(c)&&b.push(c);for(var d={0:""},e=0;e0&&b.value1)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==a.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==a.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||this.settings.captionSettings.visibleOpacity>1)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||this.settings.captionSettings.nonVisibleOpacity>1)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if("boolean"!==a.type(this.settings.fixedHeight))throw"fixedHeight must be a boolean";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),"boolean"!==a.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==a.type(this.settings.selector))throw"selector must be a string";if(this.settings.sort!==!1&&!a.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(this.settings.filter!==!1&&!a.isFunction(this.settings.sort)&&"string"!==a.type(this.settings.filter))throw"filter must be false, a string or a filter function"},b.prototype.retrieveSuffixRanges=function(){var a=[];for(var b in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(b)&&a.push(parseInt(b,10));return a.sort(function(a,b){return a>b?1:b>a?-1:0}),a},b.prototype.updateSettings=function(b){this.settings=a.extend({},this.settings,b),this.checkSettings(),this.border=this.settings.border>=0?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},a.fn.justifiedGallery=function(c){return this.each(function(d,e){var f=a(e);f.addClass("justified-gallery");var g=f.data("jg.controller");if("undefined"==typeof g){if("undefined"!=typeof c&&null!==c&&"object"!==a.type(c))throw"The argument must be an object";g=new b(f,a.extend({},a.fn.justifiedGallery.defaults,c)),f.data("jg.controller",g)}else if("norewind"===c)g.hideBuildingRowImages();else{if("destroy"===c)return void g.destroy();g.updateSettings(c),g.rewind()}g.updateEntries("norewind"===c)&&g.init()})},a.fn.justifiedGallery.defaults={sizeRangeSuffixes:{},rowHeight:120,maxRowHeight:"200%",margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.75,fixedHeight:!1,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!1,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:100,randomize:!1,sort:!1,filter:!1,selector:"> a, > div:not(.spinner)"}}(jQuery); var crellyslider_youtube_api_ready=!1,crellyslider_vimeo_api_ready=!1;!function(e){var t,i,n;t=this,i=document,n=function(e,t,i,n){var a,o;(function(e,t,i,n){function a(e){for(;e&&void 0!==e.originalEvent;)e=e.originalEvent;return e}function o(t){for(var i,n,a={};t;){for(n in i=e.data(t,k))i[n]&&(a[n]=a.hasVirtualBinding=!0);t=t.parentNode}return a}function s(){M=!0}function r(){M=!1}function c(){l(),P=setTimeout(function(){P=0,C=0,Y.length=0,O=!1,s()},e.vmouse.resetTimerDuration)}function l(){P&&(clearTimeout(P),P=0)}function d(t,i,o){var s;return(o&&o[t]||!o&&function(t,i){for(var n;t;){if((n=e.data(t,k))&&(!i||n[i]))return t;t=t.parentNode}return null}(i.target,t))&&(s=function(t,i){var o,s,r,c,l,d,p,f,u,h=t.type;if((t=e.Event(t)).type=i,o=t.originalEvent,s=e.event.props,h.search(/^(mouse|click)/)>-1&&(s=E),o)for(p=s.length;p;)t[c=s[--p]]=o[c];if(h.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1),-1!==h.search(/^touch/)&&(h=(r=a(o)).touches,l=r.changedTouches,d=h&&h.length?h[0]:l&&l.length?l[0]:n))for(f=0,u=D.length;fs||Math.abs(i.pageY-L)>s)&&!n&&d("vmousecancel",t,r),d("vmousemove",t,r),c()}}function v(e){if(!M){s();var t,i,n=o(e.target);d("vmouseup",e,n),F||(t=d("vclick",e,n))&&t.isDefaultPrevented()&&(i=a(e).changedTouches[0],Y.push({touchID:C,x:i.clientX,y:i.clientY}),O=!0),d("vmouseout",e,n),F=!1,c()}}function y(t){var i,n=e.data(t,k);if(n)for(i in n)if(n[i])return!0;return!1}function m(){}function g(t){var i=t.substr(1);return{setup:function(){y(this)||e.data(this,k,{}),e.data(this,k)[t]=!0,_[t]=(_[t]||0)+1,1===_[t]&&R.bind(i,p),e(this).bind(i,m),x&&(_.touchstart=(_.touchstart||0)+1,1===_.touchstart&&R.bind("touchstart",f).bind("touchend",v).bind("touchmove",h).bind("scroll",u))},teardown:function(){--_[t],_[t]||R.unbind(i,p),x&&(--_.touchstart,_.touchstart||R.unbind("touchstart",f).unbind("touchmove",h).unbind("touchend",v).unbind("scroll",u));var n=e(this),a=e.data(this,k);a&&(a[t]=!1),n.unbind(i,m),y(this)||n.removeData(k)}}}var b,w,k="virtualMouseBindings",S="virtualTouchID",T="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),D="clientX clientY pageX pageY screenX screenY".split(" "),I=e.event.mouseHooks?e.event.mouseHooks.props:[],E=e.event.props.concat(I),_={},P=0,N=0,L=0,F=!1,Y=[],O=!1,M=!1,x="addEventListener"in i,R=e(i),z=1,C=0;for(e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500},w=0;wMath.floor(e.pageY)||0===e.pageX&&Math.floor(a)>Math.floor(e.pageX)?(a-=i,o-=n):(oe.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-i.coords[1])i.coords[0]?"swipeleft":"swiperight";return a(n,"swipe",e.Event("swipe",{target:o,swipestart:t,swipestop:i}),!0),a(n,s,e.Event(s,{target:o,swipestart:t,swipestop:i}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,i=this,n=e(i),a={};(t=e.data(this,"mobile-events"))||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=a,a.start=function(t){if(!e.event.special.swipe.eventInProgress){e.event.special.swipe.eventInProgress=!0;var n,s=e.event.special.swipe.start(t),r=t.target,c=!1;a.move=function(t){s&&!t.isDefaultPrevented()&&(n=e.event.special.swipe.stop(t),c||(c=e.event.special.swipe.handleSwipe(s,n,i,r))&&(e.event.special.swipe.eventInProgress=!1),Math.abs(s.coords[0]-n.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())},a.stop=function(){c=!0,e.event.special.swipe.eventInProgress=!1,o.off(d,a.move),a.move=null},o.on(d,a.move).one(l,a.stop)}},n.on(c,a.start)},teardown:function(){var t,i;(t=e.data(this,"mobile-events"))&&(i=t.swipe,delete t.swipe,t.length--,0===t.length&&e.removeData(this,"mobile-events")),i&&(i.start&&e(this).off(c,i.start),i.move&&o.off(d,i.move),i.stop&&o.off(l,i.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,i){e.event.special[t]={setup:function(){e(this).bind(i,e.noop)},teardown:function(){e(this).unbind(i)}}})}(e,this)},"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e,0,i),e.mobile}):n(t.jQuery,0,i),e.CrellySlider=function(t,i){var n,a=e(t),o="div.crellyslider",s="ul.cs-slides",r="li.cs-slide",c="> *",l=0,d=!1,p=!1,f=!1,u=!0,h=new H(function(){},0),v=new Array,y=new Array,m={},g={},b=1,w=0;if(!crellyslider_youtube_api_ready&&S("youtube")&&function(){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t),crellyslider_youtube_api_ready=!0}(),!crellyslider_vimeo_api_ready&&S("vimeo")&&(!function(){function e(t){return new e.fn.init(t)}function t(e,t,i){if(!i.contentWindow.postMessage)return!1;e=JSON.stringify({method:e,value:t}),i.contentWindow.postMessage(e,s)}function i(e){var t,i;try{i=(t=JSON.parse(e.data)).event||t.method}catch(e){}if("ready"!=i||o||(o=!0),!/^https?:\/\/player.vimeo.com/.test(e.origin))return!1;"*"===s&&(s=e.origin),e=t.value;var n=t.data,r=""===r?null:t.player_id;return t=r?a[r][i]:a[i],i=[],!!t&&(void 0!==e&&i.push(e),n&&i.push(n),r&&i.push(r),00:"vimeo"==e?a.find(".cs-vimeo-iframe").length>0:-1}function T(){if(a.wrapInner('
'),a.find(o+" > ul").addClass("cs-slides"),a.find(o+" "+s+" > li").addClass("cs-slide"),0==(n=A().length))return!1;if(1==n){var t=B(0),r=a.find(o).find(s);t.clone().prependTo(r),n++}if(function(){if(!i.randomOrder&&0==i.startFromSlide)return;var e=new Array,t=new Array;if(-1==i.startFromSlide){var r=Math.floor(Math.random()*n);e[0]=r,t[0]=B(r)}else e[0]=i.startFromSlide,t[0]=B(i.startFromSlide);for(var c=1;c
'),i.showNavigation){for(var d='
',f=0;f';d+="
",a.find(o).append(d)}i.showProgressBar?a.find(o).append('
'):a.find(o).append('
'),a.css("display","block"),i.responsive&&N(),I(),A().find(".cs-background-link").html(" ").data({left:0,top:0,in:"none",out:"none",easeIn:0,easeOut:0,delay:0,time:"all"}),function(){a.find(o).find(s).css("visibility","hidden"),a.find(o).find(".cs-progress-bar").css("display","none"),a.find(o).find(".cs-navigation").css("display","none"),a.find(o).find(".cs-controls").css("display","none");var t=B(0).css("background-image");(t=t.replace(/^url\(["']?/,"").replace(/["']?\)$/,"")).match(/\.(jpeg|jpg|gif|png|bmp|tiff|tif)$/)?e("").load(function(){i()}).attr("src",t).each(function(){this.complete&&e(this).load()}):i();function i(){a.find(o).append('
'),a.find(o).find(".cs-preloader").css({"background-color":B(l).css("background-color"),"background-image":B(l).css("background-image"),"background-position":B(l).css("background-position"),"background-repeat":B(l).css("background-repeat"),"background-size":B(l).css("background-size")}),a.find(o).find(".cs-preloader > .cs-bg").css({"background-color":B(l).css("background-color"),"background-image":B(l).css("background-image"),"background-position":B(l).css("background-position"),"background-repeat":B(l).css("background-repeat"),"background-size":B(l).css("background-size")})}}(),function(){var t=new e.Deferred,i=A().find(".cs-yt-iframe, .cs-vimeo-iframe").length,n=0;if(0==i)return t.resolve().promise();return A().find(".cs-yt-iframe, .cs-vimeo-iframe").each(function(){e(this).one("load",function(){var a,o,s,r,l;++n==i&&(o=new e.Deferred,s=A(),r=s.find(c+".cs-yt-iframe").length,l=0,0==r?o.resolve().promise():(s.each(function(){e(this).find(c+".cs-yt-iframe").each(function(){var t=e(this);t.uniqueId(),t.attr("id","cs-yt-iframe-"+t.attr("id"));var i=new YT.Player(t.attr("id"),{events:{onReady:function(){++l==r&&o.resolve()},onStateChange:function(e){e.data===YT.PlayerState.ENDED&&X(t,"loop")&&i.playVideo(),p&&(e.data===YT.PlayerState.PAUSED&&(m[t.attr("id")].manually_paused=!0),e.data===YT.PlayerState.PLAYING&&(m[t.attr("id")].manually_paused=!1))}}});a={player:i,played_once:!1,manually_paused:!1},m[t.attr("id")]=a})}),o.promise())).done(function(){var i,n,a,o,s;(n=new e.Deferred,a=A(),o=a.find(c+".cs-vimeo-iframe").length,s=0,0==o?n.resolve().promise():(a.each(function(){e(this).find(c+".cs-vimeo-iframe").each(function(){var t=e(this);t.uniqueId(),t.attr("id","cs-vimeo-iframe-"+t.attr("id")),t.attr("src",t.attr("src")+"&player_id="+t.attr("id"));var a=$f(t[0]);a.addEvent("ready",function(){a.addEvent("finish",function(){g[t.attr("id")].ended=!0}),a.addEvent("play",function(){g[t.attr("id")].played_once=!0,g[t.attr("id")].ended=!1,p&&(g[t.attr("id")].manually_paused=!1)}),a.addEvent("pause",function(){p&&(g[t.attr("id")].manually_paused=!0)}),X(t,"loop")&&a.api("setLoop",!0),++s==o&&n.resolve()}),i={player:a,played_once:!1,ended:!1,manually_paused:!1},g[t.attr("id")]=i})}),n.promise())).done(function(){t.resolve()})})})}),t.promise()}().done(function(){var t=setInterval(function(){"complete"==document.readyState&&a.find(o).find(".cs-preloader").length>0&&(clearInterval(t),function(){i.responsive&&N();I(),w=e(window).width(),A().each(function(){var t=e(this);t.find(c).each(function(){var t=e(this);t.find("*").each(function(){var t=e(this);D(t)}),D(t)}),t.css("display","none"),t.data("opacity",parseFloat(t.css("opacity")))}),i.responsive&&e(window).resize(function(){w!=e(window).width()&&("full-width"==i.layout&&x()!=e(a).width()||e(a).width()x()&&x() .cs-previous").click(function(){V(C())}),a.find(o).find(".cs-controls > .cs-next").click(function(){V(z())}),i.enableSwipe&&(a.find(o).on("swipeleft",function(){M(),V(z())}),a.find(o).on("swiperight",function(){M(),V(C())})),a.find(o).find(".cs-navigation > .cs-slide-link").click(function(){V(e(this).index())}),i.pauseOnHover&&(a.find(o).find(s).hover(function(){O()}),a.find(o).find(s).mouseleave(function(){M()})),a.find(o).find(s).css("visibility","visible"),a.find(o).find(".cs-progress-bar").css("display","block"),a.find(o).find(".cs-navigation").css("display","block"),a.find(o).find(".cs-controls").css("display","block"),ne(B(0)),B(0).finish(),a.find(o).find(".cs-preloader").animate({opacity:0},300,function(){a.find(o).find(".cs-preloader").remove()}),i.beforeStart(),i.responsive?_():F()}())},100)})}function D(e){e.data("width",parseFloat(e.width())),e.data("height",parseFloat(e.height())),e.data("letter-spacing",parseFloat(e.css("letter-spacing"))),e.data("font-size",parseFloat(e.css("font-size"))),"px"==e.css("line-height").slice(-2).toLowerCase()?e.data("line-height",parseFloat(e.css("line-height"))):"normal"==e.css("line-height")?e.data("line-height",1.15*X(e,"font-size")):e.data("line-height",parseFloat(e.css("line-height"))*X(e,"font-size")),e.data("padding-top",parseFloat(e.css("padding-top"))),e.data("padding-right",parseFloat(e.css("padding-right"))),e.data("padding-bottom",parseFloat(e.css("padding-bottom"))),e.data("padding-left",parseFloat(e.css("padding-left"))),e.data("opacity",parseFloat(e.css("opacity")))}function I(){var e,t;switch(i.layout){case"fixed":e=i.startWidth,t=i.startHeight,a.find(o).css({width:L(e),height:L(t)}),A().css({width:L(e),height:L(t)});break;case"full-width":e=a.width(),t=i.startHeight,a.find(o).css({width:e,height:L(t)}),A().css({width:e,height:L(t)});break;default:return!1}}function E(e){var t=(R()-i.startHeight)/2,n=(x()-i.startWidth)/2,a=0,o=0;return t>0&&(a=t),n>0&&(o=n),{top:a,left:o}}function _(){i.beforeSetResponsive();var t=A();Y(!0),t.each(function(){var t=e(this),i=t.find(c);t.finish(),ne(t),t.finish(),i.each(function(){var t=e(this);t.finish(),oe(t),t.finish(),$(t)&&Q(t)})}),N(),I(),t.each(function(){var t=e(this);t.find(c).each(function(){var t=e(this);t.find("*").each(function(){P(e(this))}),P(t),t.finish(),se(t),t.finish(),$(t)&&Q(t)}),t.finish(),ae(t),t.finish()}),w=e(window).width(),F()}function P(e){e.css({top:L(X(e,"top")+E().top),left:L(X(e,"left")+E().left),"padding-top":L(X(e,"padding-top")),"padding-right":L(X(e,"padding-right")),"padding-bottom":L(X(e,"padding-bottom")),"padding-left":L(X(e,"padding-left"))}),e.is("input")||e.is("button")||e.text().trim().length?e.css({"line-height":L(X(e,"line-height"))+"px","letter-spacing":L(X(e,"letter-spacing")),"font-size":L(X(e,"font-size"))}):e.css({width:L(X(e,"width")),height:L(X(e,"height"))})}function N(){var e=a.width(),t=i.startWidth;b=e>=t||!i.responsive?1:e/t}function L(e){return e*b}function F(){i.automaticSlide?function e(){j(l).done(function(){d||(l=z(),e())})}():j(l),u=!1}function Y(t){for(var i=0;i .cs-slide-link").each(function(){var t=e(this);t.index()==l?t.addClass("cs-active"):t.removeClass("cs-active")}),s=B(n=t).find(c),r=0,d=!1,u=new e.Deferred,p=!1,ne(n).done(function(){var e;e=a.find(o).find(".cs-progress-bar"),W(),e.animate({width:"100%"},X(B(l),"time")),p=!0,(d=!0)&&r==s.length&&u.resolve()}),s.each(function(){var t=e(this),i=X(t,"delay");y.push(new H(function(){oe(t).done(function(){var e,i,n;$(t)&&(G(n=t)?(!X(i=n,"autoplay")||m[i.attr("id")].played_once||U()||K(i).playVideo(),2!=Z(i)||m[i.attr("id")].manually_paused||K(i).playVideo(),m[i.attr("id")].played_once=!0):(!X(e=n,"autoplay")||g[e.attr("id")].played_once||U()||te(e).api("play"),te(e).api("paused")&&!g[e.attr("id")].ended&&g[e.attr("id")].played_once&&!g[e.attr("id")].manually_paused&&te(e).api("play"))),r++,d&&r==s.length&&u.resolve()})},i))}),u.promise(),i.automaticSlide?q(t,!0,!0).done(function(){f=!0,b.resolve()}):q(t,!0,!1).done(function(){f=!0,b.resolve()}),b.promise()}function q(t,i,n){var a=B(t),o=a.find(c),s=i?X(a,"time")+X(a,"ease-in"):0,r=0,l=!1,d=new e.Deferred;return o.each(function(){var a=e(this),s=X(a,"time");if("all"!=s){var c=i?s:0;X(a,"ignore-ease-out")&&(r++,o.length==r&&l&&n&&(J(t),ae(t),d.resolve())),v.push(new H(function(){se(a).done(function(){X(a,"ignore-ease-out")||(r++,o.length==r&&l&&n&&(J(t),ae(t),d.resolve()))})},c))}}),h=new H(function(){p=!1,W(),l=!0,o.length==r&&l&&n&&(J(t),ae(t),d.resolve()),n?o.each(function(){var i=e(this);"all"==X(i,"time")&&(X(i,"ignore-ease-out")&&(r++,o.length==r&&l&&n&&(J(t),ae(t),d.resolve())),se(i).done(function(){X(i,"ignore-ease-out")||(r++,o.length==r&&l&&n&&(J(t),ae(t),d.resolve()))}))}):d.resolve()},s),d.promise()}function $(e){return G(e)||e.hasClass("cs-vimeo-iframe")}function J(t){B(t).each(function(){var t=e(this);t.find(c+".cs-yt-iframe").each(function(){ee(e(this))})}),B(t).each(function(){var t=e(this);t.find(c+".cs-vimeo-iframe").each(function(){ie(e(this))})})}function Q(e){G(e)?ee(e):ie(e)}function G(e){return e.hasClass("cs-yt-iframe")}function K(e){return m[e.attr("id")].player}function Z(e){return K(e).getPlayerState()}function ee(e){1==Z(e)&&K(e).pauseVideo()}function te(e){return g[e.attr("id")].player}function ie(e){te(e).api("pause")}function ne(t){var i=B(t),n=X(i,"in"),a=X(i,"ease-in"),o=new e.Deferred;if("block"==i.css("display"))return o.resolve().promise();if(u)return i.css({display:"block",top:0,left:0,opacity:X(i,"opacity")}),o.resolve().promise();switch(n){case"fade":i.css({display:"block",top:0,left:0,opacity:0}),i.animate({opacity:X(i,"opacity")},a,function(){o.resolve()});break;case"fadeLeft":i.css({display:"block",top:0,left:x(),opacity:0}),i.animate({opacity:X(i,"opacity"),left:0},a,function(){o.resolve()});break;case"fadeRight":i.css({display:"block",top:0,left:-x(),opacity:0}),i.animate({opacity:X(i,"opacity"),left:0},a,function(){o.resolve()});break;case"slideLeft":i.css({display:"block",top:0,left:x(),opacity:X(i,"opacity")}),i.animate({left:0},a,function(){o.resolve()});break;case"slideRight":i.css({display:"block",top:0,left:-x(),opacity:X(i,"opacity")}),i.animate({left:0},a,function(){o.resolve()});break;case"slideUp":i.css({display:"block",top:R(),left:0,opacity:X(i,"opacity")}),i.animate({top:0},a,function(){o.resolve()});break;case"slideDown":i.css({display:"block",top:-R(),left:0,opacity:X(i,"opacity")}),i.animate({top:0},a,function(){o.resolve()});break;default:i.css({display:"block",top:0,left:0,opacity:X(i,"opacity")}),o.resolve()}return o.promise()}function ae(t){var i=B(t),n=X(i,"out"),a=X(i,"ease-out"),o=new e.Deferred;if("none"==i.css("display"))return o.resolve().promise();switch(n){case"fade":i.animate({opacity:0},a,function(){i.css({display:"none",opacity:X(i,"opacity")}),o.resolve()});break;case"fadeLeft":i.animate({opacity:0,left:-x()},a,function(){i.css({display:"none",opacity:X(i,"opacity"),left:0}),o.resolve()});break;case"fadeRight":i.animate({opacity:0,left:x()},a,function(){i.css({display:"none",opacity:X(i,"opacity"),left:0}),o.resolve()});break;case"slideLeft":i.animate({left:-x()},a,function(){i.css({display:"none",left:0}),o.resolve()});break;case"slideRight":i.animate({left:x()},a,function(){i.css({display:"none",left:0}),o.resolve()});break;case"slideUp":i.animate({top:-R()},a,function(){i.css({display:"none",top:0}),o.resolve()});break;case"slideDown":i.animate({top:R()},a,function(){i.css({display:"none",top:0}),o.resolve()});break;default:i.css({display:"none"}),o.resolve()}return o.promise()}function oe(t){var i=t.outerWidth(),n=t.outerHeight(),a=X(t,"in"),o=X(t,"ease-in"),s=X(t,"top"),r=X(t,"left"),c=new e.Deferred;if("block"==t.css("display"))return c.resolve().promise();switch(a){case"slideDown":t.css({display:"block",top:-n,left:L(r+E().left),opacity:X(t,"opacity")}).animate({top:L(s+E().top)},o,function(){c.resolve()});break;case"slideUp":t.css({display:"block",top:R(),left:L(r+E().left),opacity:X(t,"opacity")}).animate({top:L(s+E().top)},o,function(){c.resolve()});break;case"slideLeft":t.css({display:"block",top:L(s+E().top),left:x(),opacity:X(t,"opacity")}).animate({left:L(r+E().left)},o,function(){c.resolve()});break;case"slideRight":t.css({display:"block",top:L(s+E().top),left:-i,opacity:X(t,"opacity")}).animate({left:L(r+E().left)},o,function(){c.resolve()});break;case"fade":t.css({display:"block",top:L(s+E().top),left:L(r+E().left),opacity:0}).animate({opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeDown":t.css({display:"block",top:-n,left:L(r+E().left),opacity:0}).animate({top:L(s+E().top),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeUp":t.css({display:"block",top:R(),left:L(r+E().left),opacity:0}).animate({top:L(s+E().top),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeLeft":t.css({display:"block",top:L(s+E().top),left:x(),opacity:0}).animate({left:L(r+E().left),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeRight":t.css({display:"block",top:L(s+E().top),left:-i,opacity:0}).animate({left:L(r+E().left),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeSmallDown":t.css({display:"block",top:L(s+E().top-30),left:L(r+E().left),opacity:0}).animate({top:L(s+E().top),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeSmallUp":t.css({display:"block",top:L(s+E().top+30),left:L(r+E().left),opacity:0}).animate({top:L(s+E().top),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeSmallLeft":t.css({display:"block",top:L(s+E().top),left:L(r+E().left+30),opacity:0}).animate({left:L(r+E().left),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeSmallRight":t.css({display:"block",top:L(s+E().top),left:L(r+E().left-30),opacity:0}).animate({left:L(r+E().left),opacity:X(t,"opacity")},o,function(){c.resolve()});break;default:t.css({display:"block",top:L(s+E().top),left:L(r+E().left),opacity:X(t,"opacity")}),c.resolve()}return c.promise()}function se(t){var i=t.outerWidth(),n=t.outerHeight(),a=X(t,"out"),o=X(t,"ease-out"),s=new e.Deferred;if("none"==t.css("display"))return s.resolve().promise();switch(a){case"slideDown":t.animate({top:R()},o,function(){t.css({display:"none"}),s.resolve()});break;case"slideUp":t.animate({top:-n},o,function(){t.css({display:"none"}),s.resolve()});break;case"slideLeft":t.animate({left:-i},o,function(){t.css({display:"none"}),s.resolve()});break;case"slideRight":t.animate({left:x()},o,function(){t.css({display:"none"}),s.resolve()});break;case"fade":t.animate({opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeDown":t.animate({top:R(),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeUp":t.animate({top:-n,opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeLeft":t.animate({left:-i,opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeRight":t.animate({left:x(),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeSmallDown":t.animate({top:L(X(t,"top")+E().top+30),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeSmallUp":t.animate({top:L(X(t,"top")+E().top-30),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeSmallLeft":t.animate({left:L(X(t,"left")+E().left-30),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeSmallRight":t.animate({left:L(X(t,"left")+E().left+30),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;default:t.css({display:"none"}),s.resolve()}return s.promise()}this.resume=function(){M()},this.pause=function(){O()},this.nextSlide=function(){V(z())},this.previousSlide=function(){V(C())},this.changeSlide=function(e){V(e)},this.getCurrentSlide=function(){return l},this.getTotalSlides=function(){return n}},e.fn.crellySlider=function(t){var i=e.extend({layout:"fixed",responsive:!0,startWidth:1140,startHeight:500,pauseOnHover:!0,automaticSlide:!0,randomOrder:!0,startFromSlide:0,showControls:!0,showNavigation:!0,showProgressBar:!0,enableSwipe:!0,slidesTime:3e3,elementsDelay:0,elementsTime:"all",slidesEaseIn:300,elementsEaseIn:300,slidesEaseOut:300,elementsEaseOut:300,ignoreElementsEaseOut:!1,videoAutoplay:!1,videoLoop:!1,beforeStart:function(){},beforeSetResponsive:function(){},beforeSlideStart:function(){},beforePause:function(){},beforeResume:function(){}},t);return this.each(function(){if(null==e(this).data("crellySlider")){var t=new e.CrellySlider(this,i);e(this).data("crellySlider",t)}})}}(jQuery); var stickyAnythingBreakpoint='' !function(e){function t(t,i,n,s,l,o,r,d){$listenerElement=e(".sticky-element-active");var c=$listenerElement.offset();if(orgElementTop=c.top,l){var a=e(l).offset();pushElementTop=a.top}var m=window,g="inner";if("innerWidth"in window||(g="client",m=document.documentElement||document.body),viewport=m[g+"Width"],o&&e("body").hasClass("admin-bar")&&viewport>600?adminBarHeight=e("#wpadminbar").height():adminBarHeight=0,e(window).scrollTop()>=orgElementTop-t-adminBarHeight&&viewport>=i&&viewport<=n){coordsOrgElement=$listenerElement.offset(),leftOrgElement=coordsOrgElement.left,widthPlaceholder=$listenerElement[0].getBoundingClientRect().width,widthPlaceholder||(widthPlaceholder=$listenerElement.css("width")),heightPlaceholder=$listenerElement[0].getBoundingClientRect().height,heightPlaceholder||(heightPlaceholder=$listenerElement.css("height")),widthSticky=e(".sticky-element-original").css("width"),"0px"==widthSticky&&(widthSticky=e(".sticky-element-original")[0].getBoundingClientRect().width),heightSticky=e(".sticky-element-original").height(),paddingOrgElement=[e(".sticky-element-original").css("padding-top"),e(".sticky-element-original").css("padding-right"),e(".sticky-element-original").css("padding-bottom"),e(".sticky-element-original").css("padding-left")],paddingSticky=paddingOrgElement[0]+" "+paddingOrgElement[1]+" "+paddingOrgElement[2]+" "+paddingOrgElement[3],marginOrgElement=[$listenerElement.css("margin-top"),$listenerElement.css("margin-right"),$listenerElement.css("margin-bottom"),$listenerElement.css("margin-left")],marginPlaceholder=marginOrgElement[0]+" "+marginOrgElement[1]+" "+marginOrgElement[2]+" "+marginOrgElement[3],assignedStyles="";for(var h in r)"inline"==r[h]?assignedStyles+=h+":inline-block; ":assignedStyles+=h+":"+r[h]+"; ";elementHeight=0,heightPlaceholder<1?elementHeight=e(".sticky-element-cloned").outerHeight():elementHeight=e(".sticky-element-original").outerHeight(),l&&e(window).scrollTop()>pushElementTop-t-elementHeight-adminBarHeight?stickyTopMargin=pushElementTop-t-elementHeight-e(window).scrollTop():stickyTopMargin=adminBarHeight,assignedStyles+="width:"+widthPlaceholder+"px; height:"+heightPlaceholder+"px; margin:"+marginPlaceholder+";",e(".sticky-element-original").removeClass("sticky-element-active").removeClass("element-is-not-sticky").addClass("element-is-sticky").css("position","fixed").css("left",leftOrgElement+"px").css("top",t+"px").css("width",widthSticky).css("margin-left",0).css("padding",paddingSticky).css("margin-top",stickyTopMargin).css("z-index",s),e(".sticky-element-placeholder").hasClass("sticky-element-active")||e(".sticky-element-placeholder").addClass("sticky-element-active").attr("style",assignedStyles)}else e(".sticky-element-original").addClass("sticky-element-active").removeClass("element-is-sticky").addClass("element-is-not-sticky").attr("style",d),e(".sticky-element-placeholder").hasClass("sticky-element-active")&&e(".sticky-element-placeholder").removeClass("sticky-element-active").removeAttr("style").css("width","0").css("height","0").css("margin","0").css("padding","0")}function i(){e(".sticky-element-original").addClass("sticky-element-active").before('')}function n(e){return o={},o.display=e.css("display"),o.float=e.css("float"),o.flex=e.css("flex"),o["box-sizing"]=e.css("box-sizing"),o.clear=e.css("clear"),o.overflow=e.css("overflow"),o.transform=e.css("transform"),o}function s(t,i,n,s,o,r,d){var c=e(".sticky-element-original").offset();if(orgElementTop=c.top,o){var a=e(o).offset();pushElementTop=a.top}var m=window,g="inner";"innerWidth"in window||(g="client",m=document.documentElement||document.body),viewport=m[g+"Width"],d&&e("body").hasClass("admin-bar")&&viewport>600?adminBarHeight=e("#wpadminbar").height():adminBarHeight=0,e(window).scrollTop()>=orgElementTop-t-adminBarHeight&&viewport>=i&&viewport<=n?(orgElement=e(".sticky-element-original"),coordsOrgElement=orgElement.offset(),leftOrgElement=coordsOrgElement.left,widthOrgElement=orgElement[0].getBoundingClientRect().width,widthOrgElement||(widthOrgElement=orgElement.css("width")),heightOrgElement=orgElement.outerHeight(),paddingOrgElement=[orgElement.css("padding-top"),orgElement.css("padding-right"),orgElement.css("padding-bottom"),orgElement.css("padding-left")],paddingCloned=paddingOrgElement[0]+" "+paddingOrgElement[1]+" "+paddingOrgElement[2]+" "+paddingOrgElement[3],1==r&&e(".sticky-element-cloned").length<1&&l(t,s),elementHeight=0,heightOrgElement<1?elementHeight=e(".sticky-element-cloned").outerHeight():elementHeight=e(".sticky-element-original").outerHeight(),o&&e(window).scrollTop()>pushElementTop-t-elementHeight-adminBarHeight?stickyTopMargin=pushElementTop-t-elementHeight-e(window).scrollTop():stickyTopMargin=adminBarHeight,e(".sticky-element-cloned").css("left",leftOrgElement+"px").css("top",t+"px").css("width",widthOrgElement).css("margin-top",stickyTopMargin).css("padding",paddingCloned).show(),e(".sticky-element-original").css("visibility","hidden")):(1==r?e(".sticky-element-cloned").remove():e(".sticky-element-cloned").hide(),e(".sticky-element-original").css("visibility","visible"))}function l(t,i){e(".sticky-element-original").clone().insertAfter(e(".sticky-element-original")).addClass("sticky-element-cloned").removeClass("element-is-not-sticky").addClass("element-is-sticky").css("position","fixed").css("top",t+"px").css("margin-left","0").css("z-index",i).removeClass("sticky-element-original").hide()}e.fn.stickThis=function(o){var r=e.extend({top:0,minscreenwidth:0,maxscreenwidth:99999,zindex:1,legacymode:!1,dynamicmode:!1,debugmode:!1,pushup:"",adminbar:!1},o),d=e(this).length,c=e(r.pushup).length;return c<1?(1==r.debugmode&&r.pushup&&console.error('STICKY ANYTHING DEBUG: There are no elements with the selector/class/ID you selected for the Push-up element ("'+r.pushup+'").'),r.pushup=""):c>1&&(1==r.debugmode&&console.error("STICKY ANYTHING DEBUG: There are "+c+' elements on the page with the selector/class/ID you selected for the push-up element ("'+r.pushup+'"). You can select only ONE element to push the sticky element up.'),r.pushup=""),d<1?1==r.debugmode&&console.error('STICKY ANYTHING DEBUG: There are no elements with the selector/class/ID you selected for the sticky element ("'+this.selector+'").'):d>1?1==r.debugmode&&console.error("STICKY ANYTHING DEBUG: There There are "+c+' elements with the selector/class/ID you selected for the sticky element ("'+this.selector+'"). You can only make ONE element sticky.'):1==r.legacymode?(e(this).addClass("sticky-element-original").addClass("element-is-not-sticky"),1!=r.dynamicmode&&l(r.top,r.zindex,r.adminbar),checkElement=setInterval(function(){s(r.top,r.minscreenwidth,r.maxscreenwidth,r.zindex,r.pushup,r.dynamicmode,r.adminbar)},10)):(e(this).addClass("sticky-element-original").addClass("element-is-not-sticky"),orgAssignedStyles=n(e(this)),orgInlineStyles=e(".sticky-element-original").attr("style"),null==orgInlineStyles&&(orgInlineStyles=""),i(),checkElement=setInterval(function(){t(r.top,r.minscreenwidth,r.maxscreenwidth,r.zindex,r.pushup,r.adminbar,orgAssignedStyles,orgInlineStyles)},10)),this}}(jQuery); ;(function($, doc, win){ "use strict"; var Photobox, photobox, options, images=[], imageLinks, activeImage=-1, activeURL, lastActive, activeType, prevImage, nextImage, thumbsStripe, docElm, APControl, changeImage, isOldIE = !('placeholder' in doc.createElement('input')), noPointerEvents=(function(){ var el=$('

')[0]; el.style.cssText='pointer-events:auto'; return !el.style.pointerEvents})(), isTouchDevice=false, thumbsContainerWidth, thumbsTotalWidth, activeThumb=$(), blankImg="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", transformOrigin=getPrefixed('transformOrigin'), transition=getPrefixed('transition'), transitionend="transitionend webkitTransitionEnd oTransitionEnd otransitionend", raf=window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function(cb){ return window.setTimeout(cb, 1000 / 60); }, preload={}, preloadPrev=new Image(), preloadNext=new Image(), closeBtn, image, video, prevBtn, nextBtn, thumbsToggler, caption, captionText, pbLoader, autoplayBtn, thumbs, wrapper, defaults={ single:false, beforeShow:null, afterClose:null, loop:true, thumb:null, thumbs:true, thumbAttr:'data-src', counter:"(A/B)", title:true, autoplay:false, time:3000, history:false, hideFlash:true, zoomable:true, wheelNextPrev:true, keys:{ close:[27, 88, 67], prev:[37, 80], next:[39, 78] }}, overlay=$('

').append(thumbsToggler=$(''), pbLoader=$('
'), prevBtn=$('
').on('click', next_prev), nextBtn=$('
').on('click', next_prev), wrapper=$('
').append(image=$(''), video=$('
') ), closeBtn=$('
').on('click', close)[0], autoplayBtn=$('
').append($('
') ), caption=$('
').append('', captionText=$('
').append('
'), thumbs=$('
').addClass('pbThumbs') ) ); function throttle(callback, duration){ var wait=false; return function(){ if(!wait){ callback.call(); wait=true; setTimeout(function(){wait=false; }, duration); }} } function prepareDOM(){ noPointerEvents&&overlay.hide(); $(doc).on('touchstart.testMouse', function(){ $(doc).off('touchstart.testMouse'); isTouchDevice=true; overlay.addClass('mobile'); }); autoplayBtn.off().on('click', APControl.toggle); thumbs.off().on('click', 'a', thumbsStripe.click); isOldIE&&overlay.addClass('msie'); overlay.off().on('click', 'img', function(e){ e.stopPropagation(); }); $(doc.body).append(overlay); docElm=doc.documentElement; } $.fn.photobox=function(target, settings, callback){ return this.each(function(){ var o, PB_data=$(this).data('_photobox'); if(PB_data){ if(target==='destroy') PB_data.destroy(); return this; } if(typeof target!='string') target='a'; if(target==='prepareDOM'){ prepareDOM(); return this; } o=$.extend({}, defaults, settings||{}); photobox=new Photobox(o, this, target); $(this).data('_photobox', photobox); photobox.callback=callback; }); } Photobox=function(_options, object, target){ this.options=$.extend({}, _options); this.target=target; this.selector=$(object||doc); this.thumbsList=null; var filtered=this.imageLinksFilter(this.selector.find(target)); this.imageLinks=filtered[0]; this.images=filtered[1]; this.init(); }; Photobox.prototype={ init:function(){ var that=this; this.selector.one('mouseenter.photobox', this.target, function(e){ that.thumbsList=thumbsStripe.generate.apply(that); }); this.selector.on('click.photobox', this.target, function(e){ e.preventDefault(); that.open(this); }); this.observerTimeout=null; if(!isOldIE&&this.selector[0].nodeType==1) this.observeDOM(this.selector[0], this.onDOMchanges.bind(this)); }, onDOMchanges:function(){ var that=this; clearTimeout(this.observerTimeout); that.observerTimeout=setTimeout(function(){ var filtered=that.imageLinksFilter(that.selector.find(that.target)), activeIndex=0, isActiveUrl=false, i; if(that.imageLinks.length==filtered[0].length) return; that.imageLinks=filtered[0]; that.images=filtered[1]; if(photobox){ if(that.selector==photobox.selector){ images=that.images; imageLinks=that.imageLinks; for(i=images.length; i--;){ if(images[i][0]==activeURL) isActiveUrl=true; }} } that.thumbsList=thumbsStripe.generate.apply(that); thumbs.html(that.thumbsList); if(that.images.length&&activeURL&&that.options.thumbs){ activeIndex=that.thumbsList.find('a[href="'+activeURL+'"]').eq(0).parent().index(); if(activeIndex==-1) activeIndex=0; thumbsStripe.changeActive(activeIndex, 0); }}, 50); }, open:function(link){ var startImage=$.inArray(link, this.imageLinks); if(startImage==-1) return false; options=this.options; images=this.images; imageLinks=this.imageLinks; photobox=this; this.setup(1); overlay.on(transitionend, function(){ overlay.off(transitionend).addClass('on'); changeImage(startImage, true); }).addClass('show'); if(isOldIE) overlay.trigger('MSTransitionEnd'); return false; }, imageLinksFilter:function(obj){ var that=this, images=[], caption={}, captionlink; return [obj.filter(function(i){ var link=$(this), thumbImg, thumbSrc=''; caption.content=link[0].getAttribute('title')||''; if(that.options.thumb) thumbImg=link.find(that.options.thumb)[0]; if(!that.options.thumb||!thumbImg) thumbImg=link.find('img')[0]; if(thumbImg){ captionlink=thumbImg.getAttribute('data-pb-captionlink'); thumbSrc=thumbImg.getAttribute(that.options.thumbAttr)||thumbImg.getAttribute('src'); caption.content=(thumbImg.getAttribute('alt')||thumbImg.getAttribute('title')||''); } if(captionlink){ captionlink=captionlink.split('['); if(captionlink.length==2){ caption.linkText=captionlink[0]; caption.linkHref=captionlink[1].slice(0,-1); }else{ caption.linkText=captionlink; caption.linkHref=captionlink; } caption.content +=' ' + caption.linkText + ''; } images.push([link[0].href, caption.content, thumbSrc]); return true; }), images]; }, observeDOM:(function(){ var MutationObserver=win.MutationObserver||win.WebKitMutationObserver, eventListenerSupported=win.addEventListener; return function(obj, callback){ if(MutationObserver){ var that=this, obs=new MutationObserver(function(mutations, observer){ if(mutations[0].addedNodes.length||mutations[0].removedNodes.length) callback(that); }); obs.observe(obj, { childList:true, subtree:true }); } else if(eventListenerSupported){ obj.addEventListener('DOMNodeInserted', callback.bind(that), false); obj.addEventListener('DOMNodeRemoved', callback.bind(that), false); }} })(), setup:function (open){ var fn=open ? "on":"off"; if(options.thumbs){ if(!isTouchDevice){ thumbs[fn]('mouseenter.photobox', thumbsStripe.calc) [fn]('mousemove.photobox', thumbsStripe.move); }} if(open){ image.css({'transition':'0s'}).removeAttr('style'); overlay.show(); thumbs .html(this.thumbsList) .trigger('mouseenter.photobox'); if(options.thumbs){ overlay.addClass('thumbs'); }else{ thumbsToggler.prop('checked', false); overlay.removeClass('thumbs'); } if(this.images.length < 2||options.single) overlay.removeClass('thumbs hasArrows hasCounter hasAutoplay'); else{ overlay.addClass('hasArrows hasCounter') if(options.time > 1000){ overlay.addClass('hasAutoplay'); if(options.autoplay) APControl.progress.start(); else APControl.pause(); } else overlay.removeClass('hasAutoplay'); } options.hideFlash&&$('iframe, object, embed').css('visibility', 'hidden'); }else{ $(win).off('resize.photobox'); } $(doc).off("keydown.photobox")[fn]({ "keydown.photobox": keyDown }); if(isTouchDevice){ overlay.removeClass('hasArrows'); wrapper[fn]('swipe', onSwipe); } if(options.zoomable){ overlay[fn]({"mousewheel.photobox": scrollZoom }); if(!isOldIE) thumbs[fn]({"mousewheel.photobox": thumbsResize }); } if(!options.single&&options.wheelNextPrev){ overlay[fn]({"mousewheel.photobox": throttle(wheelNextPrev,1000) }); }}, destroy:function(){ options=this.options; this.selector .off('click.photobox', this.target) .removeData('_photobox'); close(); }} function onSwipe(e, Dx, Dy){ if(Dx==1){ image.css({transform:'translateX(25%)', transition:'.2s', opacity:0}); setTimeout(function(){ changeImage(prevImage) }, 200); } else if(Dx==-1){ image.css({transform:'translateX(-25%)', transition:'.2s', opacity:0}); setTimeout(function(){ changeImage(nextImage) }, 200); } if(Dy==1) thumbsToggler.prop('checked', true); else if(Dy==-1) thumbsToggler.prop('checked', false); } thumbsStripe=(function(){ var containerWidth=0, scrollWidth=0, posFromLeft=0, stripePos=0, animated=null, padding, el, $el, ratio, scrollPos, pos; return{ generate:function(){ var thumbsList=$('